// pages/activity/activity.js
Page({
  data: {
    userInfo: {},
    link: ''
  },
  onLoad: function (options) {
    let userInfo = wx.getStorageSync('userInfo')
    this.setData({
      userInfo: userInfo,
    })

    // 我看自己
    let url = `https://t.gxmp.henghi.com/uri/anniversary/oneyear?openid=${userInfo.openid}&ty=0&is_min=1`
    if (options.openid) {
      // 别人看我
      url = `https://t.gxmp.henghi.com/uri/anniversary/oneyear?openid=${userInfo.openid}&ty=1&share_user_id=${userInfo.id}&is_min=1`
    }
    this.setData({
      link: url
    })
  }
})